package com.talkingdata.hadoop.guard.bean;

import org.springframework.stereotype.Repository;

@Repository
public class RmState {
    private int id ;                    // 编号
    private String clusterId ;          // 集群namespace 名称
    private String rmId ;               // rm 编号
    private String hostname ;           // 主机名
    private String httpAddress ;        //webapp.address 访问地址
    private String serviceState ;       // 服务状态
    private String timestamp ;          // 时间戳

    public RmState(int id, String clusterId, String rmId, String hostname, String httpAddress, String serviceState, String timestamp) {
        this.id = id;
        this.clusterId = clusterId;
        this.rmId = rmId;
        this.hostname = hostname;
        this.httpAddress = httpAddress;
        this.serviceState = serviceState;
        this.timestamp = timestamp;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getClusterId() {
        return clusterId;
    }

    public void setClusterId(String clusterId) {
        this.clusterId = clusterId;
    }

    public String getRmId() {
        return rmId;
    }

    public void setRmId(String rmId) {
        this.rmId = rmId;
    }

    public String getHostname() {
        return hostname;
    }

    public void setHostname(String hostname) {
        this.hostname = hostname;
    }

    public String getHttpAddress() {
        return httpAddress;
    }

    public void setHttpAddress(String httpAddress) {
        this.httpAddress = httpAddress;
    }

    public String getServiceState() {
        return serviceState;
    }

    public void setServiceState(String serviceState) {
        this.serviceState = serviceState;
    }

    public String getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(String timestamp) {
        this.timestamp = timestamp;
    }

    @Override
    public String toString() {
        return "RmState{" +
                "id=" + id +
                ", clusterId='" + clusterId + '\'' +
                ", rmId='" + rmId + '\'' +
                ", hostname='" + hostname + '\'' +
                ", httpAddress='" + httpAddress + '\'' +
                ", serviceState='" + serviceState + '\'' +
                ", timestamp='" + timestamp + '\'' +
                '}';
    }

    /*public RmState(String clusterId, String rmId, String hostname, String httpAddress, String serviceState, String timestamp) {
        this.clusterId = clusterId;
        this.rmId = rmId;
        this.hostname = hostname;
        this.httpAddress = httpAddress;
        this.serviceState = serviceState;
        this.timestamp = timestamp;
    }*/

    public RmState() {
    }
}
